//package ServletDemo01;
//
//import User.Student;
//import util.GokJDBCUtil;
//
//import java.io.IOException;
//import javax.servlet.ServletException;
//import javax.servlet.annotation.WebServlet;
//import javax.servlet.http.HttpServlet;
//import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletResponse;
//
///**
// * Servlet implementation class StudentEditServlet
// */
//@WebServlet("/toedit")
//public class ToStudentEditServlet extends HttpServlet {
//	private static final long serialVersionUID = 1L;
//
//
//	/**
//	 * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
////		1.获取参数
//		String id=request.getParameter("id");
////		2.操作数据库
//		Student stu = GokJDBCUtil.queryForObject("select * from student where id=?", Student.class, id);
//
////		3.响应结果
////		学生信息存到作用域  并跳到edit.jsp
//		request.setAttribute("stu", stu);
//		request.getRequestDispatcher("edit.jsp").forward(request,response);
//
//	}
//
//	/**
//	 * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
//	 */
//	protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//		// TODO Auto-generated method stub
//		doGet(request, response);
//	}
//
//}
